package com.fengplus.demo.mapper;

import com.fengplus.demo.entity.AppProductStock;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface AppProductStockMapper {

    AppProductStock findOne(Long productId);

//    int findAmount(Long productId);

    int save(@Param("productId") Long productId, @Param("amount") int amount);

    int decrease(@Param("productId") Long productId, @Param("amount") int amount);

}
